const express = require('express');
const cors = require('cors');
const bodyParser = require('body-parser');
const studentRouter = require('./router/student');
const app = express();
app.use(express.static('public'));
app.use(cors());
//中间件
app.use(bodyParser.urlencoded({extended:true}));
app.use(studentRouter);
app.listen(3000,err=>{
    if(!err){
        console.log('服务器启动成功！！');
    }else{
        console.log(err);
    }
})